package com.liuguang.gateway.config.security.others;


import com.liuguang.api.gateway.security.pojo.bo.AuthUser;

/**
 * @ClassName: CurrentUserHolder
 * @Description：
 * @Author: wanghr
 * Date: 2:34 PM 2020/9/20
 * Version: 1.0
 */
public class CurrentUserHolder {
    private static final ThreadLocal<AuthUser> currentUser = new ThreadLocal<AuthUser>();

    public static AuthUser getCurrentUser() {
        return currentUser.get();
    }

    public static void setCurrentUser(AuthUser user) {
        currentUser.set(user);
    }
}
